/*
 * @Description:
 * @Author:
 * @Date: 2024-12-09 00:16:58
 * @LastEditTime: 2025-01-19 15:11:27
 * @LastEditors: XXX
 */
import { type App } from 'vue'
import _SvgIcon from './SvgIcon'

export type LoadComponent = (app: App, keys: string[]) => void

const loadComponent: LoadComponent = (app: App, keys: string[]) => {
  if (Array.isArray(keys)) {
    keys.forEach(item => {
      if (item === 'svg-icon') {
        app.component('svg-icon', _SvgIcon)
      }
    })
  }
}

export default loadComponent

export const SvgIcon = _SvgIcon
